<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/pages/mastertemplate/MasterPage.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:syn="http://www.syniverse.com">
	<ui:define name="content">
		<h:form id="chonNTX">
			<table>
				<tr>
					<td><p:outputLabel value="Ngày Thực Xuất từ ngày: " /></td>
					<td><p:calendar pattern="dd/MM/yyyy" id="tuNgay"
							required="true" showButtonPanel="true"
							value="#{BAOCAOBEAN.tuNgay}">
							<p:ajax event="dateSelect"
								listener="#{BAOCAOBEAN.onDateSelectTuNgay}" />
						</p:calendar></td>
					<td><p:outputLabel value="Ngày Thực Xuất đến ngày: " /></td>
					<td><p:calendar pattern="dd/MM/yyyy" id="denNgay"
							required="true" showButtonPanel="true"
							value="#{BAOCAOBEAN.denNgay}">
							<p:ajax event="dateSelect"
								listener="#{BAOCAOBEAN.onDateSelectDenNgay}" />
						</p:calendar></td>
				</tr>
			</table>
			<p:commandButton id="buttonClick" value="Lưu "
				action="#{BAOCAOBEAN.showReport}" update=":danhsachHD:dataTable" />
		</h:form>
		<h:form id="danhsachHD">
			<p:dataTable styleClass="tableColoredPanel" id="dataTable"
				var="hoadon" value="#{BAOCAOBEAN.listHD}" paginator="true" rows="20"
				currentPageReportTemplate="(Hiển thị {startRecord} - {endRecord} of 
       {totalRecords} hóa đơn)"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="10,20,50,100" widgetVar="dataTableForm"
				style="width: 100%; margin: 45px auto;">
				<f:facet name="header">


				</f:facet>
				<p:column headerText="Số Hóa Đơn" width="10%"
					filterBy="#{hoadon.so_hoadon}" filterMatchMode="contains"
					style="text-align:center" sortBy="#{hoadon.so_hoadon}">#{hoadon.so_hoadon}  </p:column>
				<p:column headerText="Ngày PH" filterBy="#{hoadon.ngay}" width="8%"
					style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.ngay}">
					<p:outputLabel value="#{hoadon.ngay}">
						<f:convertDateTime pattern="dd/MM/yyyy " />
					</p:outputLabel>
				</p:column>
				<p:column headerText="Ngày TX" filterBy="#{hoadon.ng_tx}" width="8%"
					style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.ng_tx}">
					<p:outputLabel value="#{hoadon.ng_tx}">
						<f:convertDateTime pattern="dd/MM/yyyy " />
					</p:outputLabel>
				</p:column>
				<p:column headerText="Số Xe" filterBy="#{hoadon.soxe}" width="8%"
					style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.soxe}">#{hoadon.soxe}  </p:column>
				<p:column headerText="Người nhận" filterBy="#{hoadon.ng_nhan}"
					width="10%" style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.ng_nhan}">#{hoadon.ng_nhan}  </p:column>
				<p:column headerText="Giờ nhận" filterBy="#{hoadon.gionhan}"
					width="8%" style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.gionhan}">#{hoadon.gionhan}  </p:column>

				<p:column headerText="Mã HH" filterBy="#{hoadon.ma_vthh}" width="7%"
					style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.ma_vthh}">#{hoadon.ma_vthh}  </p:column>
				<p:column headerText="SL TX" filterBy="#{hoadon.sl_tx}" width="7%"
					style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.sl_tx}">#{hoadon.sl_tx}  </p:column>
				<p:column headerText="SL TX15" filterBy="#{hoadon.sl_tx15}"
					width="8%" style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.sl_tx15}">#{hoadon.sl_tx15}  </p:column>
				<p:column headerText="Tỉ trọng" filterBy="#{hoadon.titrong}"
					width="8%" style="text-align:center" filterMatchMode="contains"
					sortBy="#{hoadon.titrong}">#{hoadon.titrong}  </p:column>
				<p:column headerText="T&#176; " width="5%" style="text-align:center"
					sortBy="#{hoadon.nhietdo}">#{hoadon.nhietdo}  </p:column>

			</p:dataTable>
		</h:form>

	</ui:define>
</ui:composition>
